package com.atguigu.yygh.statistics.controller;

import com.atguigu.yygh.common.result.R;
import com.atguigu.yygh.statistics.service.StatisticService;
import com.atguigu.yygh.vo.order.OrderCountQueryVo;
import com.atguigu.yygh.vo.order.OrderCountVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author mgx
 * @version 1.0
 * @description: TODO
 * @date 2022/9/11 10:46
 */
@RestController
@RequestMapping("/admin/statistics")
@Api(tags = {"预约统计管理"})
public class StatisticsController {

    @Autowired
    private StatisticService statisticService;

    @ApiOperation(value = "带条件查询的预约统计")
    @GetMapping("/getCountByOrderInfo")
    public R getCountByOrderInfo(OrderCountQueryVo orderCountQueryVo){
        Map<String,Object> map = statisticService.getCountByOrderInfo(orderCountQueryVo);
        return R.ok().data(map);
    }
}
